<%@ page import="org.jasig.cas.client.validation.Assertion" %>
<%@ page import="org.jasig.cas.client.util.AssertionHolder" %>
<%@ page import="org.jasig.cas.client.authentication.AttributePrincipal" %>
<%@ page import="java.util.Map" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <meta charset="UTF-8">
    <title>智能报修系统——工单统计报表</title>
    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/rightDiv.css"/>
    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/manager.css"/>
    <!--引入交互所需css-->
    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/jNotify.jquery.css"/>
    <script src="<%= request.getContextPath()%>resources/js/manager.js" type="text/javascript" charset="utf-8"></script>
</head>
<body ng-app="managerApp">
<%System.out.println(basePath);%>
<!--头部开始-->
<%

    Assertion assertion = AssertionHolder.getAssertion();

    AttributePrincipal ap =  assertion.getPrincipal();   //获取AttributePrincipal对象，这是客户端对象

    String name = ap.getName();

    Map<String,Object> att = ap.getAttributes();//获取属性值，为一个Map类型。

%>

<div id="head">
    <div id="head_con">
        <p class="title">智能报修系统</p>
        <div class="phoneNum"  ng-controller="servicenumCtrl">
            服务电话：
            <span id="servicenum">
					{{servicephone}}
				</span>
        </div>
    </div>

</div>
<!--头部结束-->
<!--左边开始-->
<div id="staffLeft">
    <div id="staffLeftCon">
        <!--管理人员的信息-->
        <div id="staffInfo">
            <!--姓名-->
            <p class="staffName">Administrator</p>
            <!--客服学号-->
            <!--<p class="staffNum">1506111111</p>-->
            <p class="staffNum"><%=name %></p>
            <input type="hidden" class="useraccount" value="<%=name %>"/>
            <!--职位-->
            <p class="place">管理人员</p>
        </div>

        <%--a 标签跳转后左边目录栏字体颜色设置 开始--%>

        <style>
            #operation a:link,a:visited,a:hover{
                text-decoration: none;
                color: #4e7500;
            }
        </style>
        <%--a 标签跳转后左边目录栏字体颜色设置 结束--%>

        <div id="operation">
            <ul>
                <a href="/complainli"><li id="complainli"  >投诉管理 </li></a>
                <a href="/tiao1"><li id="createli"  >创建工单</li></a>
                <a href="/ordermanageli"><li id="ordermanageli">工单管理</li></a>
                <a href="/tiao2"> <li id="faultli" >故障分类管理</li></a>
                <a href="/totalorderli"><li id="totalorderli" class="active">工单统计报表</li></a>
                <a href="/yeji"><li id="performancesli">运维人员业绩</li></a>
                <a href="/worktypeli"><li id="worktypeli">运维人员管理</li></a>
                <a href="/guanli"><li id="websiteli">网站管理</li></a>
            </ul>
        </div>
    </div>
</div>
<!--左边结束-->
<!--右边开始-->
<div id="pushOrdersRight">
    <div id="pushOrdersRight_con">

        <!--工单统计报表开始-->
        <div id="totalwork"  ng-controller="totalworkCtrl">
            <div class="sort">
                <a>分类:</a>
                <a class="sort_con department" ng-click="querybydepart()">部门</a>
                <a class="sort_con fault" ng-click="querybyfault()">故障</a>
                <a>年份：</a>
                <select class="sort_con" ng-model="selecttime" ng-options="t.ttt for t in times">
                </select>
            </div>
            <div id="totalwork_choice">
                <table id="department_table">
                    <tr>
                        <th  class="xi">部门/月份</th>
                        <th>1月</th>
                        <th>2月</th>
                        <th>3月</th>
                        <th>4月</th>
                        <th>5月</th>
                        <th>6月</th>
                        <th>7月</th>
                        <th>8月</th>
                        <th>9月</th>
                        <th>10月</th>
                        <th>11月</th>
                        <th>12月</th>
                        <th>合计</th>
                    </tr>
                    <tr ng-repeat="(key,d) in deaprttotalwork">
                        <td class="xi">{{d.userAddress | isnull}}</td>
                        <td>{{d.jan | isnull}}</td>
                        <td>{{d.feb | isnull}}</td>
                        <td>{{d.mar | isnull}}</td>
                        <td>{{d.apr | isnull}}</td>
                        <td>{{d.may | isnull}}</td>
                        <td>{{d.jun | isnull}}</td>
                        <td>{{d.jul | isnull}}</td>
                        <td>{{d.aug | isnull}}</td>
                        <td>{{d.sep | isnull}}</td>
                        <td>{{d.oct | isnull}}</td>
                        <td>{{d.nov | isnull}}</td>
                        <td>{{d.dec | isnull}}</td>
                        <td>{{d.jan+d.feb+d.mar+d.apr+d.may+d.jun+d.jul++d.aug+d.sep+d.oct+d.nov+d.dec | isnull}}</td>
                    </tr>
                </table>
                <table id="fault_table">
                    <tr>
                        <th class="xi">故障/月份</th>
                        <th>1月</th>
                        <th>2月</th>
                        <th>3月</th>
                        <th>4月</th>
                        <th>5月</th>
                        <th>6月</th>
                        <th>7月</th>
                        <th>8月</th>
                        <th>9月</th>
                        <th>10月</th>
                        <th>11月</th>
                        <th>12月</th>
                        <th>合计</th>
                    </tr>
                    <tr  ng-repeat="(key,f) in faulttotalwork">
                        <td class="xi">{{f.details | isnull}}</td>
                        <td>{{f.jan | isnull}}</td>
                        <td>{{f.feb | isnull}}</td>
                        <td>{{f.mar | isnull}}</td>
                        <td>{{f.apr | isnull}}</td>
                        <td>{{f.may | isnull}}</td>
                        <td>{{f.jun | isnull}}</td>
                        <td>{{f.jul | isnull}}</td>
                        <td>{{f.aug | isnull}}</td>
                        <td>{{f.sep | isnull}}</td>
                        <td>{{f.oct | isnull}}</td>
                        <td>{{f.nov | isnull}}</td>
                        <td>{{f.dec | isnull}}</td>
                        <td>{{f.jan+f.feb+f.mar+f.apr+f.may+f.jun+f.jul++f.aug+f.sep+f.oct+f.nov+f.dec | isnull}}</td>
                    </tr>
                </table>

                <%--<div class="turnpagediv">--%>
                    <%--<button class="prepage">上一页</button>--%>
                    <%--<p class="currentpage">当前第1页</p>--%>
                    <%--<button class="nextpage">下一页</button>--%>
                <%--</div>--%>
            </div>
        </div>
        <!--工单统计报表结束-->

    </div>
</div>
<!--右边结束-->
<div id="footer" class="footer">
    <p class="footerWord">版权所有&nbsp;四川旅游学院</p>
</div>
<!--引入交互所需文件-->
<script type="text/javascript" src="<%= request.getContextPath()%>resources/js/jquery-3.1.1.min.js"></script>
<script src="<%= request.getContextPath()%>resources/js/angular.min.js" type="text/javascript" charset="utf-8"></script>
<script src="<%= request.getContextPath()%>resources/js/managerController.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="<%= request.getContextPath()%>resources/js/jNotify.jquery.js"></script>
</body>
</html>
